package socket;

import ClientDemo.HCNetSDK;
import com.google.gson.*;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.net.Socket;
import java.util.*;

public class MyThread extends Thread {
    public static Set<MyThread> set = new HashSet<>();
    public Socket finalAccept;
    OutputStream outputStream;
    InputStream inputStream;

    public MyThread(Socket finalAccept) {
        this.finalAccept = finalAccept;
    }

    @Override
    public void run() {
        try {
            float screenMidx = 640 / 2;
            float screenMidy = 480 / 2;
            int len = -1;       //字节位置
            byte[] buff = new byte[1024];
            inputStream = finalAccept.getInputStream();  //输入流对象
            outputStream = finalAccept.getOutputStream();  //输出流对象
            while ((len = inputStream.read(buff)) != -1) {    //又是阻塞程序，等待输入内容
                try {
                    String s = new String(buff, 0, len, "utf-8");
                    System.out.println(s);
                    JsonObject json = new JsonParser().parse(s).getAsJsonObject();

                } catch (NumberFormatException e) {
                    e.printStackTrace();
                }

            }
        } catch (Exception e) {
            e.printStackTrace();
        }
//                                System.out.println(object[0]);

    }

    //循环
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        long n = scanner.nextLong();
        long[] a = new long[100000];
        a[0] = 0L;
        a[1] = 1L;
        for (int i = 2; i <= n; i++) {
            a[i] = a[i - 1] + a[i - 2];
        }
    }

    //递归
    private static long fun(long n) {
        if (n == 0) {
            return 0L;
        }else if (n == 1) {
            return 1L;
        }
        return fun(n - 1) + fun(n - 2);

    }

}
